package com.zyh.file;

import java.io.File;
import java.io.FileFilter;

public class FileDemo4 {
    public static void main(String[] args) {
        File file = new File("day04-code/src/com/zyh/file");
        File[] files = file.listFiles(new FileFilter() {
            @Override
            public boolean accept(File pathname) {
                return pathname.isFile()&&pathname.getName().endsWith(".java");
            }
        });
        System.out.println("files.length = " + files.length);
    }
}
